package com.shop.scheduling.service.impl;

import com.shop.scheduling.feign.item.IItemAtomFeignClientSvc;
import com.shop.scheduling.service.IScheduingJobs;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/**
 * @Description:
 *
 * @author zhoulk
 * @date: 2019年04月21日  21:55
 */
@Component
public class ScheduingJobs implements IScheduingJobs {

    @Autowired
    IItemAtomFeignClientSvc iItemAtomFeignClientSvc;

    @Override
    @Scheduled(cron = "0 26 * * * ?")
    public void searchScheduingJob() {
        System.out.println("我被调用了1");
    }

    @Override
    @Scheduled(fixedRate=10*60*1000)
    public void orderPayScheduing() {
        System.out.println("我被调用了2");
    }

    @Override
    public void orderEndScheduing() {

    }

    @Override
    @Scheduled(fixedRate=10*60*1000)
    public void flushSolr() {
        iItemAtomFeignClientSvc.flushSolr();
    }
}
